﻿using Abp.Runtime.Validation;
using LeadThing.AbpZeroTemplate.Dto;

namespace LeadThing.AbpZeroTemplate.Authorization.Users.Dto
{
    public class GetUsersInput : PagedAndSortedInputDto, IShouldNormalize
    {
        public string Filter { get; set; }

        public string Permission { get; set; }

        public int? Role { get; set; }

        public long UserId { get; set; }

        public string UserType { get; set; }

        public string PhoneNumber { get; set; }

        /// <summary>
        /// 镇
        /// </summary>
        public int TownID { get; set; }

        /// <summary>
        /// 区
        /// </summary>
        public int AreaID { get; set; }

        /// <summary>
        /// 村庄
        /// </summary>
        public int VillageID { get; set; }


        public void Normalize()
        {
            if (string.IsNullOrEmpty(Sorting))
            {
                Sorting = "Name,Surname";
            }
        }
    }
}